<!-- top menu dove aggiungere funzionalità comuni a tutte le view -->
<div class="navbar navbar-inverse navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
			<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<a class="brand" href="#">Whelper alpha</a>
			<div class="nav-collapse collapse">
				<div  >
					<ul class="nav">
		             <li class='<?php if ($this->name=='Home') echo "active"; ?>'>
							<?php echo $this->Acl->link(__("Test"), "/Home",null,null,null,null,true);  ?>
			         </li>
		             <li class='<?php if ($this->name=='Categories') echo "active"; ?>'>
							<?php echo $this->Acl->link(__("Categoria"), "/Categories",null,null,null,null,true);  ?>
			          </li>
		             <li class='<?php if ($this->name=='Help') echo "active"; ?>'>
							<?php echo $this->Acl->link(__("Help"), "/Help",null,null,null,null,false);  ?>
			          </li>
		             <li class='<?php if ($this->name=='Parametro') echo "active"; ?>'>
							<?php echo $this->Acl->link(__("Parametri"), "/Parametro",null,null,null,null,true);  ?>
			          </li>
		             <li class='<?php if ($this->name=='Info') echo "active"; ?>'>
							<?php echo $this->Acl->link(__("Info"), "/Info",null,null,null,null,true);  ?>
			          </li>
					</ul>
				</div>
				<div class="span5 pull-right" >
					<div class="navbar-content">
						<ul class="nav pull-right">
							<li id="fat-menu" class="dropdown">
								<a id="drop3" class="dropdown-toggle" data-toggle="dropdown" role="button" href="#"> <i class="<?php echo AppController::$flags[Configure::read('Config.language')];?>"></i>&nbsp;<?php echo __("Lingua")?>
								<b class="caret"></b> </a>
								<ul class="dropdown-menu" aria-labelledby="drop3" role="menu">
									<li role="presentation">
										<a href='<?php echo $this->webroot;?>Users/lang/ita' tabindex="-1" role="menuitem"><i class="famfamfam-flag-it"></i>&nbsp;<?php echo __("Italiano")?></a>
									</li>
									<li role="presentation">
										<a href='<?php echo $this->webroot;?>Users/lang/eng' tabindex="-1" role="menuitem"><i class="famfamfam-flag-gb"></i>&nbsp;<?php echo __("Inglese")?></a>
									</li>
								</ul>
							</li>
						</ul>
					</div>
					<div class="navbar-content">
						<?php	if (!empty($utente)) {
						?>
						<ul class="nav pull-right">
							<li id="fat-menu" class="dropdown">
								<a id="drop3" class="dropdown-toggle" data-toggle="dropdown" role="button" href="#"> <i class="icon-user"></i>&nbsp;<?php echo $utente['username']?>
								<b class="caret"></b> </a>
								<ul class="dropdown-menu" aria-labelledby="drop3" role="menu">
									<li role="presentation">
										<a href='#' tabindex="-1" role="menuitem"><?php echo __("Mio profilo")?></a>
									</li>
									<li role="presentation">
										<a href='<?php echo $this->webroot;?>Users/password' tabindex="-1" role="menuitem"><?php echo __("Cambia password")?></a>
									</li>
									<li class="divider" role="presentation"></li>
									<li role="presentation">
										<a href='<?php echo $this->webroot;?>Users/logout' tabindex="-1" role="menuitem"><?php echo __("Logout")?></a>
									</li>
								</ul>
							</li>
						</ul>
						<?php } else { ?>
						<form class="form-inline navbar-form pull-right" action='<?php echo $this->webroot;?>Users/login' method="post" id="form_login">
							<input type="text" name="data[User][username]" class="input-small" placeholder="Login">
							<input type="password" name="data[User][password]" class="input-small" placeholder="Password">
							<button type="submit" class="btn btn-primary btn-mini">
								Entra
							</button>
							<a href='<?php echo $this->webroot;?>Users/register' class="btn btn-mini" tabindex="-1" role="menuitem">Registrati</a>
						</form>
						<?php } ?>
					</div>
				</div><!--/.nav-collapse -->
			</div>
		</div>
	</div>
</div>


